package com.zhang.zhangapp.view.custom;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;

import com.jwenfeng.library.pulltorefresh.view.HeadView;
import com.zhang.zhangapp.R;

/**
 * Created by Administrator on 2018/3/23.
 */
public class HeadRefreshView extends FrameLayout implements HeadView {


    public HeadRefreshView(Context context) {
        this(context,null);
        init(context);
    }

    public HeadRefreshView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public HeadRefreshView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }

    private void init(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.refresh_header_view,null);
        addView(view);
    }

    @Override
    public void begin() {

    }

    @Override
    public void progress(float progress, float all) {
        float s = progress / all;
        if (s >= 0.9f){
        }else{
        }
        if (progress >= all-10){
        }else{
        }
    }

    @Override
    public void finishing(float progress, float all) {

    }

    @Override
    public void loading() {
    }

    @Override
    public void normal() {
    }

    @Override
    public View getView() {
        return this;
    }
}
